﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Neocean.Mpa.MusicStore;
using System;
using System.Collections.Generic;
using System.Text;

namespace Neocean.Mpa.EntityFrameworkCore.EntityMapper
{
    public class MovieConfiguration : BaseEntityTypeConfiguration<Movie>
    {
        public override void Configure(EntityTypeBuilder<Movie> entityTypeBuilder)
        {
            base.Configure(entityTypeBuilder);
            entityTypeBuilder.ToTable(MusicStoreTableNames.Movie);
            entityTypeBuilder.HasKey(m => m.Id);//.HasAnnotation()
            //entityTypeBuilder.Property(x => x.Id).//.HasColumnType("TINYINT UNSIGNED");
            entityTypeBuilder.Property(x => x.Title).HasMaxLength(255).IsRequired();
                             //.HasColumnType("TEXT");
            
                            
        }


    }
}
